package com.example.demo.service;

import com.example.demo.mapper.HelloMapper;
import mode.helloview;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HelloService {
    private final HelloMapper helloMapper;

    @Autowired
    public HelloService(HelloMapper helloMapper) {
        this.helloMapper = helloMapper;
    }
    public boolean insert(helloview model) {
        return helloMapper.insert(model) > 0;
    }
    public List<helloview> selectAll() {
        return helloMapper.selectList(null);
    }
}
